<h1>Fidelidades</h1>

<?php echo $this->Html->link('Adicionar Fidelidade', array('controller' => 'fidelities', 'action' => 'add')); ?>

<table>
	<tr>
		<th>Id</th>
		<th>Usuário</th>
		<th>Estabelecimento</th>
		<th>Data de Criação</th>
		<th>Data de Modificação</th>
	</tr>
	
	<?php foreach ($fidelities as $fidelity): ?>
	
	<tr>
		<td><?php echo $this->Html->link($fidelity['Fidelity']['id'], array('controller' => 'fidelities', 'action' => 'view', $fidelity['Fidelity']['id'])); ?></td>
		<td><?php echo $fidelity['User']['username']; ?></td>
		<td><?php echo $fidelity['Establishment']['name']; ?></td>
		<td><?php echo $fidelity['Fidelity']['created']; ?></td>
		<td><?php echo $fidelity['Fidelity']['modified']; ?></td>	
		<td><?php echo $this->Html->link('Editar', array('action' => 'edit', $fidelity['Fidelity']['id'])); ?></td>
		<td><?php echo $this->Form->postLink('Apagar', array('action' => 'delete', $fidelity['Fidelity']['id']), array('confirm' => 'Tem certeza de que deseja apagar a fidelidade?')); ?></td>
	</tr>
	
	<?php endforeach; ?>
</table>	 
	